<template>
  <div class="main-container">
    <div class="item-content">
      <div class="form-content" style="margin-bottom: 20px">
        <div class="item-header">
          <div class="subheading">参培人员花名册</div>
          <div>
            <el-select
              v-model="selectValue"
              placeholder="请选择查看类型"
              style="width: 100%"
              @change="change"
            >
              <el-option label="全部" :value="1" key="1"> </el-option>
              <el-option label="重要人员" :value="2" key="2"> </el-option>
              <el-option label="社保未交" :value="3" key="3"> </el-option>
              <el-option label="社保已交" :value="4" key="4"> </el-option>
              <el-option label="劳动合同未交" :value="5" key="5"> </el-option>
              <el-option label="劳动合同已交" :value="6" key="6"> </el-option>
              <el-option label="商业保险未交" :value="7" key="7"> </el-option>
              <el-option label="商业保险已交" :value="8" key="8"> </el-option>
              <el-option label="安全责任书未交" :value="9" key="9"> </el-option>
              <el-option label="安全责任书已交" :value="10" key="10">
              </el-option>
            </el-select>
          </div>
        </div>
        <!-- 表格展示 -->
        <!-- .filter((item) => {
                if (selectValue == '2') {
                  return item.audit == 1;
                } else if (selectValue == '1') {
                  return item.audit == 0;
                } else {
                  return true;
                }
              }) -->
        <div>
          <el-table
            height="600"
            v-loading="loading"
            :data="employeeInformationTableData"
            border
            style="width: 100%"
          >
            <template #empty>
              <el-empty description="暂无数据"> </el-empty>
            </template>
            <el-table-column prop="name" label="姓名" width="100" fixed>
            </el-table-column>
            <el-table-column prop="post" label="岗位" width="150">
            </el-table-column>
            <el-table-column prop="telephone" label="联系电话" width="120">
            </el-table-column>
            <el-table-column
              prop="jobNumber"
              label="工号"
              width="150"
            ></el-table-column>
            <el-table-column
              prop="idNumber"
              label="身份证号"
              width="200"
            ></el-table-column>
            <el-table-column prop="education" label="学历" width="130">
              <template #default="{ row }">
                <el-select v-model="row.education" disabled style="width: 100%">
                  <el-option label="小学" :value="1"> </el-option>
                  <el-option label="初中" :value="2"> </el-option>
                  <el-option label="高中" :value="3"> </el-option>
                  <el-option label="大专" :value="4"> </el-option>
                  <el-option label="大学" :value="5"> </el-option>
                  <el-option label="研究生" :value="6"> </el-option>
                  <el-option label="其他" :value="7"> </el-option>
                </el-select>
              </template>
            </el-table-column>
            <el-table-column
              prop="jobTitle"
              label="职称"
              width="150"
            ></el-table-column>
            <el-table-column prop="socialSecurity" label="社保情况" width="150">
              <template #default="{ row }">
                <el-select
                  disabled
                  v-model="row.socialSecurity"
                  placeholder="请选择"
                  style="width: 100%"
                >
                  <el-option label="已交" :value="1"> </el-option>
                  <el-option label="未交" :value="0"> </el-option>
                </el-select>
              </template>
            </el-table-column>
            <el-table-column
              prop="businessInsurance"
              label="商业保险"
              width="150"
            >
              <template #default="{ row }">
                <el-select
                  disabled
                  v-model="row.businessInsurance"
                  placeholder="请选择"
                  style="width: 100%"
                >
                  <el-option label="已交" :value="1"> </el-option>
                  <el-option label="未交" :value="0"> </el-option>
                </el-select>
              </template>
            </el-table-column>
            <el-table-column
              prop="trainingLink"
              label="培训情况链接"
              width="150"
            >
              <template #default="{ row }">
                <el-link target="blank" :href="row.trainingLink" type="primary">
                  {{ row.trainingLink }}
                </el-link>
              </template>
            </el-table-column>
            <el-table-column
              prop="certificateName"
              label="资格证书名称"
              width="120"
            >
              <template #default="{ row }">
                <el-link
                  v-show="row.certificateName != null"
                  type="primary"
                  :href="row.certificateName"
                  target="blank"
                  >点击查看</el-link
                >
              </template>
            </el-table-column>
            <el-table-column prop="laborContract" label="劳动合同">
              <template #default="{ row }">
                <el-link
                  v-show="row.laborContract != null"
                  type="primary"
                  :href="row.laborContract"
                  target="blank"
                  >点击查看</el-link
                >
              </template>
            </el-table-column>
            <el-table-column prop="medicalReport" label="体检报告">
              <template #default="{ row }">
                <el-link
                  v-show="row.medicalReport != null"
                  type="primary"
                  :href="row.medicalReport"
                  target="blank"
                  >点击查看</el-link
                >
              </template>
            </el-table-column>
            <el-table-column
              prop="safetyResponsibilityLetter "
              label="安全责任书"
              width="100"
            >
              <template #default="{ row }">
                <el-link
                  v-show="row.safetyResponsibilityLetter != null"
                  type="primary"
                  :href="row.safetyResponsibilityLetter"
                  target="_blank"
                  >点击查看</el-link
                >
              </template>
            </el-table-column>
            <el-table-column label="操作" fixed="right">
              <template #default="{ row }">
                <el-popconfirm
                  style="margin-right: 10px"
                  title="确定删除吗？"
                  @confirm="deleteSafetyRow(row.id)"
                >
                  <!-- <el-button slot="reference" type="danger" size="large"
                    >删除</el-button
                  > -->
                  <el-link type="primary" slot="reference">删除</el-link>
                  <!-- <a slot="reference"></a> -->
                </el-popconfirm>
                <el-link
                  type="primary"
                  @click="editSafetyRow(row.id)"
                  slot="reference"
                  >编辑</el-link
                >
              </template>
            </el-table-column>
          </el-table>
        </div>
      </div>
      <div
        style="and
          width: 100%;
          display: flex;
          justify-content: center;
          align-items: center;
          height: 50px;
          margin: 0;
        "
      >
        <el-pagination
          :current-page="page"
          :page-sizes="[10, 15, 50, 100, 200, 300, 400, 1000]"
          :page-size="size"
          layout="total, sizes, prev, pager, next, jumper"
          :total="total"
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
        >
        </el-pagination>
      </div>
      <el-dialog
        title="人员信息修改填写"
        :visible.sync="employeeInformationVisible"
        width="60%"
        center
      >
        <el-form
          :model="employeeInformationForm"
          ref="ruleForm"
          label-width="auto"
        >
          <el-row :gutter="50">
            <el-col :span="6">
              <el-form-item label="姓名：" prop="name">
                <el-input
                  placeholder="请输入姓名"
                  v-model="employeeInformationForm.name"
                >
                </el-input>
              </el-form-item>
            </el-col>

            <el-col :span="6">
              <el-form-item label="工号：" prop="jobNumber">
                <el-input
                  placeholder="请输入工号"
                  v-model="employeeInformationForm.jobNumber"
                >
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="岗位：" prop="post">
                <el-input
                  placeholder="请输入岗位"
                  v-model="employeeInformationForm.post"
                >
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="身份证号：" prop="idNumber">
                <el-input
                  placeholder="请输入身份证号"
                  v-model="employeeInformationForm.idNumber"
                >
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="联系电话：" prop="telephone">
                <el-input
                  placeholder="请输入联系电话"
                  v-model="employeeInformationForm.telephone"
                >
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="学历 ：" prop="education">
                <!-- <el-input placeholder="学历 " v-model="employeeInformationForm.phone"> </el-input> -->
                <el-select
                  v-model="employeeInformationForm.education"
                  placeholder="请选择"
                  style="width: 100%"
                >
                  <el-option label="小学" :value="1"> </el-option>
                  <el-option label="初中" :value="2"> </el-option>
                  <el-option label="高中" :value="3"> </el-option>
                  <el-option label="大专" :value="4"> </el-option>
                  <el-option label="大学" :value="5"> </el-option>
                  <el-option label="研究生" :value="6"> </el-option>
                  <el-option label="其他" :value="7"> </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="职称：" prop="jobTitle">
                <el-input
                  placeholder="请输入职称"
                  v-model="employeeInformationForm.jobTitle"
                >
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="社保情况：" prop="socialSecurity">
                <el-select
                  v-model="employeeInformationForm.socialSecurity"
                  placeholder="请选择"
                  style="width: 100%"
                >
                  <el-option label="已交" :value="1"> </el-option>
                  <el-option label="未交" :value="0"> </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="商业保险：" prop="businessInsurance">
                <el-select
                  v-model="employeeInformationForm.businessInsurance"
                  placeholder="请选择"
                  style="width: 100%"
                >
                  <el-option label="已交" :value="1"> </el-option>
                  <el-option label="未交" :value="0"> </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="培训情况链接：" prop="trainingLink">
                <el-input
                  placeholder="请输入培训情况链接"
                  v-model="employeeInformationForm.trainingLink"
                >
                </el-input>
              </el-form-item>
            </el-col>
            <el-col></el-col>
            <el-col :span="6">
              <el-form-item label="资格证书名称：" prop="certificateName">
                <el-upload
                  v-model="employeeInformationForm.certificateName"
                  :file-list="fileList1"
                  :on-success="certificateNameSuccess"
                  :on-remove="certificateNameRemove"
                  class="upload-demo"
                  action="/api/upload"
                  multiple
                  :limit="limit"
                  :on-error="fileError"
                >
                  <!-- :limit="1" -->
                  <el-button type="primary">上传证书</el-button>
                </el-upload>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="劳动合同：" prop="laborContract">
                <el-upload
                  v-model="employeeInformationForm.laborContract"
                  :file-list="fileList2"
                  :on-success="laborContractSuccess"
                  :on-remove="laborContractRemove"
                  class="upload-demo"
                  action="/api/upload"
                  multiple
                  :limit="limit"
                  :on-error="fileError"
                >
                  <el-button type="primary">上传劳动合同</el-button>
                </el-upload>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="体检报告：" prop="medicalReport">
                <el-upload
                  v-model="employeeInformationForm.medicalReport"
                  :file-list="fileList3"
                  :on-success="medicalReportSuccess"
                  :on-remove="medicalReportRemove"
                  class="upload-demo"
                  action="/api/upload"
                  multiple
                  :limit="limit"
                  :on-error="fileError"
                >
                  <el-button type="primary">上传体检报告</el-button>
                </el-upload>
              </el-form-item>
            </el-col>

            <el-col :span="6">
              <el-form-item
                label="安全责任书："
                prop="safetyResponsibilityLetter"
              >
                <el-upload
                  v-model="employeeInformationForm.safetyResponsibilityLetter"
                  :file-list="fileList4"
                  :on-success="safetyResponsibilityLetterSuccess"
                  :on-remove="safetyResponsibilityLetterRemove"
                  class="upload-demo"
                  action="/api/upload"
                  :on-error="fileError"
                  :limit="limit"
                >
                  <el-button type="primary">上传责任书</el-button>
                </el-upload>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
        <span slot="footer" class="dialog-footer">
          <el-button type="primary" @click="submitSecurity()">确 定</el-button>
          <el-button @click="employeeInformationVisible = false"
            >取 消</el-button
          >
        </span>
      </el-dialog>
    </div>
  </div>
</template>

<script setup>
import { defineProps, defineComponent, onBeforeMount } from "vue";
import {
  searchInformation,
  changeinformation,
  deleteInformation,
} from "@/api/employee";
// searchInformationTotal
const fileList1 = ref([]);
const fileList2 = ref([]);
const fileList3 = ref([]);
const fileList4 = ref([]);
const loading = ref(true);
const limit = 1;
const selectValue = ref(1);
const props = defineProps();
const message = "Hello, Vue 3!";
const total = ref(0);
const page = ref(1);
const size = ref(10);
const list = ref([
  { select: null, value: null },
  { select: null, value: null },
  { select: "social_security", value: 0 },
  { select: "social_security", value: 1 },
  { select: "labor_contract", value: "null" },
  { select: "labor_contract", value: "notnull" },
  { select: "business_insurance", value: 0 },
  { select: "business_insurance", value: 1 },
  { select: "safety_responsibility_letter", value: "null" },
  { select: "safety_responsibility_letter", value: "notnull" },
]);
import { Notification } from "element-ui";
const change = async () => {
  page.value = 1;
  changeTable();
};
const changeTable = async () => {
  console.log(selectValue);
  loading.value = true;
  let result = await await searchInformation(
    page.value,
    size.value,
    list.value[Number(selectValue.value) - 1]?.select,
    list.value[Number(selectValue.value) - 1]?.value
  );
  employeeInformationTableData.value = result?.data;
  total.value = Number(result?.message);
  if (isNaN(total.value)) {
    total.value = 0;
  }
  loading.value = false;
};
const handleSizeChange = async (val) => {
  size.value = val;
  page.value = 1;
  changeTable();
};
const handleCurrentChange = async (val) => {
  page.value = val;
  changeTable();
};
onBeforeMount(async () => {
  // loading.value = true;
  // total.value = await (await searchInformationTotal()).data;
  // let result = await (await searchInformation(1, 10)).data;
  // console.log(result, total);
  // employeeInformationTableData.value = result;
  // console.log(employeeInformationTableData);
  // loading.value = false;
  changeTable();
});
const NewComponentName = defineComponent({
  name: "TraineesTable",
  setup() {
    return {
      message,
    };
  },
});
const fileError = () => {
  Notification({
    title: "失败",
    message: "上传失败",
    type: "warning",
  });
}; // 安全责任书移除
const safetyResponsibilityLetterRemove = (file) => {
  console.log(file.url);
  fileList4.value.map((item, index) => {
    if (item.url == file.url) {
      fileList4.value.splice(index, 1);
    }
  });
};
//安全责任书文件上传
const safetyResponsibilityLetterSuccess = (res) => {
  if (res.code == 0) {
    Notification({
      title: "成功",
      message: "上传成功",
      type: "success",
    });
    fileList4.value.push({
      name: res.data[1],
      url: "api/" + res.data[0],
    });
    employeeInformationForm.value.safetyResponsibilityLetter =
      "api/" + res.data[0];
  } else {
    Notification({
      title: "失败",
      message: "上传失败",
      type: "warning",
    });
  }
};
//劳动合同移除
const medicalReportRemove = (file) => {
  console.log(file.url);
  fileList3.value.map((item, index) => {
    if (item.url == file.url) {
      fileList3.value.splice(index, 1);
    }
  });
};
//劳动合同文件上传
const medicalReportSuccess = (res) => {
  if (res.code == 0) {
    Notification({
      title: "成功",
      message: "上传成功",
      type: "success",
    });
    fileList3.value.push({
      name: res.data[1],
      url: "api/" + res.data[0],
    });
    employeeInformationForm.value.medicalReport = "api/" + res.data[0];
  } else {
    Notification({
      title: "失败",
      message: "上传失败",
      type: "warning",
    });
  }
};
// 劳动合同移除
const laborContractRemove = (file) => {
  console.log(file.url);
  fileList2.value.map((item, index) => {
    if (item.url == file.url) {
      fileList2.value.splice(index, 1);
    }
  });
};
//劳动合同文件上传
const laborContractSuccess = (res) => {
  if (res.code == 0) {
    Notification({
      title: "成功",
      message: "上传成功",
      type: "success",
    });
    fileList2.value.push({
      name: res.data[1],
      url: "api/" + res.data[0],
    });
    employeeInformationForm.value.laborContract = "api/" + res.data[0];
  } else {
    Notification({
      title: "失败",
      message: "上传失败",
      type: "warning",
    });
  }
};
// 资格证书移除
const certificateNameRemove = (file) => {
  console.log(file.url);
  fileList1.value.map((item, index) => {
    if (item.url == file.url) {
      fileList1.value.splice(index, 1);
    }
  });
};
//资格证书文件上传
const certificateNameSuccess = (res) => {
  if (res.code == 0) {
    Notification({
      title: "成功",
      message: "上传成功",
      type: "success",
    });
    fileList1.value.push({
      name: res.data[1],
      url: "api/" + res.data[0],
    });
    employeeInformationForm.value.certificateName = "api/" + res.data[0];
  } else {
    Notification({
      title: "失败",
      message: "上传失败",
      type: "warning",
    });
  }
};
// employeeInformation;
// 使用props和NewComponentName，以避免ESLint报错
console.log(props);
console.log(NewComponentName);
import { ref } from "vue";
//单选框
const employeeInformationVisible = ref(false);
//dialog表单
const employeeInformationForm = ref({
  id: null,
  name: null, // 姓名：
  jobNumber: null, //  工号：
  post: null, //岗位：
  idNumber: null, // 身份证号：
  telephone: null, // 联系电话：
  education: null, // 学历
  jobTitle: null, // 职称：
  socialSecurity: null, // 社保情况：
  businessInsurance: null, // 商业保险：
  trainingLink: null, // 培训情况链接：
  certificateName: null, // 资格证书名称：
  laborContract: null, //劳动合同：
  medicalReport: null, //体检报告：
  safetyResponsibilityLetter: null, // 安全责任书：
});
const employeeInformationTableData = ref([
  // {
  //   name: "", // 姓名：
  //   jobNumber: "", //  工号：
  //   post: "", //岗位：
  //   idNumber: "", // 身份证号：
  //   telephone: "", // 联系电话：
  //   education: "", // 学历
  //   jobTitle: "", // 职称：
  //   socialSecurity: "", // 社保情况：
  //   businessInsurance: "", // 商业保险：
  //   trainingLink: "", // 培训情况链接：
  //   certificateName: "", // 资格证书名称：
  //   laborContract: "", //劳动合同：
  //   medicalReport: "", //体检报告：
  //   safetyResponsibilityLetter: "", // 安全责任书：
  // },
]);
//编辑行 安全
const editSafetyRow = (id) => {
  fileList1.value = [];
  fileList2.value = [];
  fileList3.value = [];
  fileList4.value = [];
  const item = employeeInformationTableData.value.find((item) => item.id == id);
  if (item) {
    employeeInformationForm.value = { ...item };
    employeeInformationForm.value.type = "edit";
    employeeInformationVisible.value = true;
    employeeInformationForm.value.certificateName != null
      ? fileList1.value.push({
          name: employeeInformationForm.value.certificateName,
        })
      : "";
    employeeInformationForm.value.laborContract != null
      ? fileList2.value.push({
          name: employeeInformationForm.value.laborContract,
        })
      : "";
    employeeInformationForm.value.medicalReport != null
      ? fileList3.value.push({
          name: employeeInformationForm.value.medicalReport,
        })
      : "";
    employeeInformationForm.value.safetyResponsibilityLetter != null
      ? fileList4.value.push({
          name: employeeInformationForm.value.safetyResponsibilityLetter,
        })
      : "";
  } else {
    console.error("Item with id " + id + " not found.");
  }
};
//删除
const deleteSafetyRow = async (id) => {
  console.log("id:" + id);
  // employeeInformationTableData.value =
  //   employeeInformationTableData.value.filter((item) => item.id != id);
  let result = await deleteInformation(Number(id));
  if (result.code == 0) {
    Notification({
      title: "成功",
      message: "删除成功",
      type: "success",
    });

    changeTable();
  } else {
    Notification({
      title: "失败",
      message: "删除失败",
      type: "warning",
    });
  }
};
const submitSecurity = async () => {
  fileList1.value.length == 0
    ? (employeeInformationForm.value.certificateName = null)
    : "";
  fileList2.value.length == 0
    ? (employeeInformationForm.value.laborContract = null)
    : "";
  fileList3.value.length == 0
    ? (employeeInformationForm.value.medicalReport = null)
    : "";
  fileList4.value.length == 0
    ? (employeeInformationForm.value.safetyResponsibilityLetter = null)
    : "";
  employeeInformationVisible.value = false;
  if (employeeInformationForm.value.type === "edit") {
    let result = await changeinformation(employeeInformationForm.value);
    if (result.code == 0) {
      Notification({
        title: "成功",
        message: "修改成功",
        type: "success",
      });
      changeTable();
    }
    // const index = employeeInformationTableData.value.findIndex(
    //   (item) => item.id === employeeInformationForm.value.id
    // );
    // if (index !== -1) {
    //   //错误更新数组
    //   employeeInformationTableData.value[index] = {
    //     ...employeeInformationForm.value,
    //   };
    //   // 正确更新数组项
    //   employeeInformationTableData.value.splice(index, 1, {
    //     ...employeeInformationForm.value,
    //   });
    // } else {
    //   console.error(
    //     "Item with id " + employeeInformationForm.value.id + " not found."
    //   );
    // }
  } else {
    employeeInformationTableData.value.push({
      ...employeeInformationForm.value,
    }); // Assuming you use timestamp for unique ID
  }
  // 重置 employeeInformationForm 为初始状态
  clearLoading();
  console.log(employeeInformationForm.value);
};
const clearLoading = () => {
  //dialog表单
  employeeInformationForm.value = {
    id: null,
    name: null, // 姓名：
    jobNumber: null, //  工号：
    post: null, //岗位：
    idNumber: null, // 身份证号：
    telephone: null, // 联系电话：
    education: null, // 学历
    jobTitle: null, // 职称：
    socialSecurity: null, // 社保情况：
    businessInsurance: null, // 商业保险：
    trainingLink: null, // 培训情况链接：
    certificateName: null, // 资格证书名称：
    laborContract: null, //劳动合同：
    medicalReport: null, //体检报告：
    safetyResponsibilityLetter: null, // 安全责任书：
  };
};
</script>
<style lang="scss" scoped>
// :deep(.cell) {
//   display: flex;
//   justify-content: space-around;
// }
/*去除upload组件过渡效果*/
::v-deep .el-upload-list__item {
  transition: none !important;
}
::v-deep .el-upload-list__item-thumbnail {
  /* 图片在方框内显示长边 */
  object-fit: scale-down !important;
}

:deep(.el-input__inner) {
  height: auto !important;
}
:deep(.el-icon-arrow-right:before) {
  font-size: 12px !important;
}
:deep(.el-table th) {
  background: #fafafa;
}
:deep(.el-collapse-item__header) {
  font-weight: bold;
  color: #333;
  font-size: 15px;
  padding: 0 10px;
}
:deep(.el-icon-arrow-right:before) {
  font-weight: bold;
  color: #333;
  font-size: 25px;
}
body {
  min-height: 100vh;

  transition: all 0.3s ease;
}
.container {
  padding: 15px;
  overflow: auto;
  box-sizing: border-box;

  .main-content {
    background-color: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    min-width: 700px;

    .header-container {
      padding: 15px 15px;
      border-bottom: solid 1px #e6e6e6;
      box-sizing: border-box;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;

      .title {
        position: relative;
        font-weight: bold;
        color: #333;
        font-size: 15px;
        padding-left: 16px;

        &::before {
          content: "";
          width: 3px;
          height: 16px;
          background-color: #82a848;
          left: 5px;
          top: calc(50% - 8px);
          position: absolute;
        }

        &::after {
          content: "";
          width: 3px;
          height: 16px;
          background-color: #82a848;
          left: 5px;
          top: calc(50% - 8px);
          position: absolute;
        }
      }
    }
  }
}

.main {
  padding: 12px 15px;

  .item-content {
    height: 100%;
    overflow: hidden;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;

    .item-header {
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;

      .subheading {
        position: relative;
        color: #555;
        font-size: 14px;
        padding-left: 14px;

        &::after {
          content: "";
          width: 2px;
          height: 14px;
          background-color: #82a848;
          left: 0;
          top: calc(50% - 7px);
          position: absolute;
        }

        &::before {
          content: "";
          width: 2px;
          height: 14px;
          background-color: #82a848;
          left: 4px;
          top: calc(50% - 7px);
          position: absolute;
        }
      }
    }

    .content-container {
      margin-top: -1px;
    }
  }
}

.w-100 {
  width: 100%;
}

.item-form-content {
  display: flex;
  flex-direction: row;
  align-items: center;

  i {
    margin: 0 10px;
  }
}

.productList-content {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  height: 40px;
}

.form-content {
  padding: 0 10px;
}
.dialog-action-bar {
  text-align: center;
  margin-top: 30px;
}
</style>
